package uy.com.antel;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.Vector;

public class ConsultaDB {
	private Vector<tableInfo> infoAll = new Vector<tableInfo>();
	
	public ConsultaDB() throws SQLException {
		String sql_ideditorial = "show tables;";
		
		Connection con = null;
		Statement stmt = null;
		ResultSet rs_ideditorial = null;
		
		
		con = DBConn.DataSourceCon();
		con.setAutoCommit(false);
		stmt = con.createStatement();
		rs_ideditorial = stmt.executeQuery(sql_ideditorial);

		while(rs_ideditorial.next()) {
			System.out.println(rs_ideditorial.getString(1));
			
			infoAll.add(new tableInfo(rs_ideditorial.getString(1)));
		}
	}

	public Vector<tableInfo> getInfoAll() {
		return infoAll;
	}

	public void setInfoAll(Vector<tableInfo> infoAll) {
		this.infoAll = infoAll;
	}

		
	
}
